package com.daiyilu.com.office4all.controller;


import com.daiyilu.com.office4all.pdf.PdfWaterMask;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

@RestController
@RequestMapping("pdf")
public class PdfController {

    @RequestMapping("maskwords")
    public void maskwords(){
        try {
            PdfWaterMask.maskWords("D:\\demo.pdf","宸帆电子商务有限公司",new FileOutputStream( "watermask.pdf"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
